<!--{subtemplate jameson_read:touch/header}-->
<div class="header">
  <div class="weui-flex">
    <div class="weui-flex__item header_left">
      <a href="{eval echo mbreurl('author',0);}">
        <i class="fa fa-address-book-o"></i>
      </a>
    </div>
    <div class="weui-flex__item header_title">
    <!--{lang jameson_read:tianjiaxinshu}-->
    </div>
    <div class="weui-flex__item header_right">
      <a href="{eval echo mbreurl('author',0);}">
        <i class="fa fa-home"></i>
      </a>
    </div>
  </div>
</div>

<form action="./plugin.php?id=jameson_read&contrl=touchauthor&act=postbook" method="post" enctype="multipart/form-data" id="book_descro_menu">
  <div class="weui-cells">
    <div class="weui-cell">
      <div class="weui-cell__bd">
        <ul class="weui-uploader__files" id="uploaderFiles">
          <li class="weui-uploader__file" style="background-image:url({if is_file('./data/attachment/forum/'.$books['image'])}./data/attachment/forum/{$books['image']}{else}{$_G['jameson_read']['morenfengmian']}{/if})"></li>
        </ul>
        <div class="weui-uploader__input-box">
          <input id="uploaderInput" onchange="jameson.setfm(this.files[0])" class="weui-uploader__input" type="file" accept="image/*"   name="imgname">
        </div>
      </div>
    </div>
    <input type="hidden" name="formhash" value="{FORMHASH}" />
    <input type="hidden" name="book_id" value="{$books['book_id']}" />
    
    <div class="weui-cell">
        <div class="weui-cell__hd">
          <label class="weui-label">
            <!--{lang jameson_read:shuming}-->
          </label>
        </div>
        <div class="weui-cell__bd">
          <input required class="weui-input" id="book_name" name="book_name"  type="text" placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:shuming}">
        </div>
    </div>

    <div class="weui-cell">
        <div class="weui-cell__hd">
          <label class="weui-label">
            <!--{lang jameson_read:zuozhe}-->
          </label>
        </div>
        <div class="weui-cell__bd">
          <input class="weui-input" name="author" id="author"  type="text" placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:zuozhe}">
        </div>
    </div>   
    <div class="weui-cell weui-cell_select weui-cell_select-after">
        <div class="weui-cell__hd">
          <label class="weui-label">
            <!--{lang jameson_read:fenlei}-->
          </label>
        </div>
        <div class="weui-cell__bd">
          <select class="weui-select"  name="parent_id" id="selectcategory" onchange="jameson.changeCategory(this)" >
            <!--{loop $books['categorys'] $value}-->
              <option {if $value['category_id'] == $books['parent_id']}selected{/if} value="{$value['category_id']}">
              <!--{$value['category_name']}-->
              </option>
            <!--{/loop}-->
          </select>
          <select class="weui-select"  name="category_id" id="selectcategory_menu" >
            <!--{loop $books['childcate'] $value}-->
              <option {if $value['category_id'] == $books['category_id']}selected{/if}  value="{$value['category_id']}">
              <!--{$value['category_name']}-->
              </option>
            <!--{/loop}-->
          </select>
        </div>
    </div> 
    <div class="weui-cell">
        <div class="weui-cell__hd">
          <label class="weui-label">
            <!--{lang jameson_read:jianjie}-->
          </label>
        </div>
        <div class="weui-cell__bd">
          <textarea class="weui-textarea" name="desco" id="desco"   placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:jianjie}"></textarea>
        </div>
    </div>   
    <div class="weui-cell">
        <div class="weui-cell__hd">
          <label class="weui-label">
            <!--{lang jameson_read:zhuangtai}-->
          </label>
        </div>
        <div class="weui-cell__bd">
          <select class="weui-select"  name="plan" id="plan" >
              <option value="0">{lang jameson_read:lianzaizhong}</option>
              <option value="1">{lang jameson_read:yiwanjie}</option>
          </select>
        </div>
    </div>   
  </div>
    <div class="weui-btn-area">
          <button type="button" onclick="jameson.tjbook()" class="weui-btn weui-btn_primary" >
          <!--{lang jameson_read:tijiao}-->
          </button>
    </div>
</form>
<!--{subtemplate jameson_read:touch/footer}-->